﻿using System.Web;
using CooliteExamples.Code.DAL;
using CooliteExamples.Core.Extensions;
using CooliteExamples.Web.Code;

namespace CooliteExamples.Web.Handlers.Author
{
		/// <summary>
		/// Summary description for $codebehindclassname$
		/// </summary>
		public class GetAuthorsForBook : HandlerBase
		{
				public override void ProcessRequest(HttpContext context)
				{
						int bookId = context.Request[Core.Constants.BOOK_ID_PARAM_NAME].AsInt();
						var asr = new AjaxStoreResult(AuthorDAL.GetAuthorsForBook(bookId));
						asr.ExecuteResult(context);
				}
		}
}
